package demo.hw;

import java.util.*;

/**
 * 输入
 * 3 2 2 1 11 1 2 3 4 5 6 7 8 9 10 11
 * 输出
 * 1 2 3 4 5 ... 11
 * 说明第一组是3个数字分别是2 2 1
 * 第二组是11个数字，分别是1 2 3 4 5 6 7 8 9 10 11
 *
 * @author taqo
 * @date 2021/5/24
 */
public class _明明的随机数 {
    public static void main(String[] args) {
        int a[] = {3, 2, 2, 1, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12,1,0,2,98,99};
        Scanner sc = new Scanner(System.in);
        int i = sc.nextInt();
        int arr[] = new int[i];
        for (int j = 0; j < i; j++) {
            arr[j] = sc.nextInt();
            insertSort(arr,sc.nextInt());
        }
        // System.out.println(Arrays.toString(arr));
        a(a);
    }

    private static void insertSort(int[] arr, int n) {

    }

    private static void a(int[] a) {
        Set<Integer> b = new TreeSet<>();
        int right = 0;
        for (int i = 0; i < a.length; i++) {
            if (i == right) {
                right = i+ a[right] + 1;
                continue;
            }
            b.add(a[i]);
        }

        System.out.println(b);
    }

}
